/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package connection;

import javax.persistence.EntityManager;
import javax.persistence.Persistence;

/**
 *
 * @author Dentinho
 */
public class EMF {
    
    private static EntityManager em;

    public EMF() {
    }

    public static EntityManager getEm() {
        if(em == null){
            em = Persistence.createEntityManagerFactory("conexao").createEntityManager();
        }
        return em;
    }
    
    
}
